package com.pojo;

import java.util.Date;

public class Student {
    private int sid;//主键
    private String sname;//姓名
    private String sex;//性别
    private Date sbir;//生日
    private String hobby;//爱好
    private String photo;//图像

    public Student() {
    }
    //因为到 Dao里面执行 sql语句  sid自增 photo先可以为null 所以写这四个参数
    //servlet 里面获取到的值  封装成Student 对象 传参传过去 学生对象
    public Student(String sname, String sex, Date sbir, String hobby) {
        this.sname = sname;
        this.sex = sex;
        this.sbir = sbir;
        this.hobby = hobby;
    }

    public int getSid() {
        return sid;
    }

    public void setSid(int sid) {
        this.sid = sid;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Date getSbir() {
        return sbir;
    }

    public void setSbir(Date sbir) {
        this.sbir = sbir;
    }

    public String getHobby() {
        return hobby;
    }

    public void setHobby(String hobby) {
        this.hobby = hobby;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    @Override
    public String toString() {
        return "Student{" +
                "sid=" + sid +
                ", sname='" + sname + '\'' +
                ", sex='" + sex + '\'' +
                ", sbir=" + sbir +
                ", hobby='" + hobby + '\'' +
                ", photo='" + photo + '\'' +
                '}';
    }
}
